package com.xxgc.moriserver.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import lombok.Data;
import org.dromara.autotable.annotation.ColumnComment;
import org.dromara.autotable.annotation.ColumnDefault;
import org.dromara.autotable.annotation.mysql.MysqlTypeConstant;
import org.dromara.mpe.autotable.annotation.ColumnId;
import org.dromara.mpe.autotable.annotation.Table;
import org.dromara.mpe.processer.annotation.AutoDefine;
import org.dromara.mpe.processer.annotation.AutoMapper;
import org.dromara.mpe.processer.annotation.AutoRepository;

@AutoDefine
@AutoMapper
@AutoRepository
@Data
@Table(value = "user", comment = "用户表")
public class UserEntity {

    @ColumnComment("用户ID")
    @ColumnId(mode = IdType.AUTO, comment = "id主键", type = MysqlTypeConstant.BIGINT, length = 32)
    private String userId;

    @ColumnComment("用户名")
    private String userName;

    @ColumnComment("密码")
    private String userPass;

    @ColumnComment("昵称")
    private String nickName;

    @ColumnComment("手机号")
    private String phone;

    @ColumnComment("小程序唯一ID")
    private String openId;

    @ColumnComment("邮箱")
    private String email;

    @ColumnComment("等级")
    @ColumnDefault("1")
    private Integer level;

    @ColumnComment("经验值")
    @ColumnDefault("0")
    private Integer exp;

    @ColumnComment("金币数量")
    @ColumnDefault("100")
    private Integer gold;

    @ColumnComment("性别")
    @ColumnDefault("男")
    private String sex;

    @ColumnComment("头像")
    private String avatar;
}
